package com.zhiyou100.controller;

import java.io.IOException;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

//@ControllerAdvice
public class AdviceController {
	//普通异常
	@ExceptionHandler(value=Exception.class)
	public String m1(){
		return "error/1";
	}
	//io 异常
	@ExceptionHandler(value=IOException.class)
	public String m2(){
		return "error/2";
	}
	//空打点异常 异常
		@ExceptionHandler(value=NullPointerException.class)
		public String m3(){
			return "error/3";
		}
}
